package br.com.AC.entidades;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the consulta database table.
 * 
 */
@Embeddable
public class ConsultaPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private int idConsulta;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="dt_hr_consult")
	private java.util.Date dtHrConsult;

    public ConsultaPK() {
    }
	public int getIdConsulta() {
		return this.idConsulta;
	}
	public void setIdConsulta(int idConsulta) {
		this.idConsulta = idConsulta;
	}
	public java.util.Date getDtHrConsult() {
		return this.dtHrConsult;
	}
	public void setDtHrConsult(java.util.Date dtHrConsult) {
		this.dtHrConsult = dtHrConsult;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ConsultaPK)) {
			return false;
		}
		ConsultaPK castOther = (ConsultaPK)other;
		return 
			(this.idConsulta == castOther.idConsulta)
			&& this.dtHrConsult.equals(castOther.dtHrConsult);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idConsulta;
		hash = hash * prime + this.dtHrConsult.hashCode();
		
		return hash;
    }
}